<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2017/11/9
 * Time: 21:27
 */

namespace App;


use Illuminate\Database\Eloquent\Model;

class Product extends Model
{
    protected $table = 'fz_product';
    protected $fillable = [
        'name', 'type', 'price','number'
    ];
    public static function getName($id){
        return Product::find($id)->name;
    }
    public static function getType($id){
        return Product::find($id)->type;
    }
    public static function getPrice($id){
        return Product::find($id)->price;
    }
}